package com.goods.business.service.imp;


import com.goods.business.mapper.OutStockInfoMapper;
import com.goods.business.service.InStockInfoService;
import com.goods.business.service.OutStockInfoService;
import com.goods.common.model.business.InStockInfo;
import com.goods.common.model.business.OutStockInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author ：Hachimen
 * @date ：Created in 2021/9/25 16:08
 * @description：
 * @modified By：
 * @version:
 */
@Service
public class OutStockInfoServiceImpl implements OutStockInfoService {
    @Autowired
    private OutStockInfoMapper outStockInfoMapper;

    @Override
    public void add(OutStockInfo outStockInfo) {
        outStockInfoMapper.insert(outStockInfo);
    }

    @Override
    public List<OutStockInfo> getList(String outNum) {
        Example example = new Example(OutStockInfo.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("outNum",outNum);
        List<OutStockInfo> list = outStockInfoMapper.selectByExample(example);
        return list;
    }
}
